﻿using Dora.Tools.Enums.Contract;
using System;
using System.Collections.Generic;

namespace Dora.Tools.EContract.Dto
{
    /// <summary>
    /// 申报合同基本信息
    /// </summary>
    public class EContractDto
    {
        /// <summary>
        /// 旅行社自定义合同编号
        /// </summary>
        public string ERPContractId { get; set; }
        /// <summary>
        /// 合同模板id, 每份合同必须有 --- 必填
        /// A00001 – 境内游
        /// C00001 – 出境游
        /// D00001 – 一日游
        /// F00001 – 赴台游
        /// E00001 – 代订代办
        public string templateId { get; set; }
        /// <summary>
        /// 接收回调链接
        /// </summary>
        public string callbackURL { get; set; }
        /// <summary>
        /// 是否多人签署
        /// </summary>
        public bool isMultiSignatory { get; set; }
        /// <summary>
        /// 其他约定内容
        /// </summary>
        public string supplementaryClause { get; set; }
        /// <summary>
        /// 公共附件列表
        /// </summary>
        public List<int> publicAttachments { get; set; }
        /// <summary>
        /// 合同附件信息集合
        /// </summary>
        public List<Attachment> attachments { get; set; } 
        /// <summary>
        /// 旅行社信息部分
        /// </summary>
        public TravelAgency travelAgency { get; set; } 
        /// <summary>
        /// 行程信息部分
        /// </summary>
        public Itinerary itinerary { get; set; } 
        /// <summary>
        /// 游客名单部分
        /// </summary>
        public TouristsInfo touristsInfo { get; set; } 
        /// <summary>
        /// 签署人信息 签署人/游客代表部分
        /// </summary>
        public Signatory signatory { get; set; }
        /// <summary>
        /// 行程模式 0 标准，1 简易
        /// </summary>
        public int inputType { get; set; }
        /// <summary>
        /// 导游部分
        /// </summary>
        public List<TourGuides> tourGuides { get; set; } 
        /// <summary>
        /// 费用部分
        /// </summary>
        public Cost cost { get; set; } 
        /// <summary>
        /// 保险信息
        /// </summary>
        public Insurance insurance { get; set; }
        /// <summary>
        /// 争议解决信息
        /// </summary>
        public Dispute dispute { get; set; }
        /// <summary>
        /// 自费项目信息
        /// </summary>
        public List<Activities> activities { get; set; }
        /// <summary>
        /// 是否含购 -- 购物部分
        /// </summary>
        public bool hasShopping { get; set; }
        /// <summary>
        /// 含购物景点名称 -- 购物部分
        /// </summary>
        public string shoppingViewSpot { get; set; }
        /// <summary>
        /// 购物部分
        /// </summary>
        public List<Shopping> shoppings { get; set; }
        /// <summary>
        /// 成团约定信息
        /// </summary>
        public GroupAgreement groupAgreement { get; set; } 
        /// <summary>
        /// 委托事项
        /// </summary>
        public Entrustment entrustment { get; set; }
    }

    public class EContractByOrderDTO
    {
        /// <summary>
        /// 根组织机构ID
        /// </summary>
        public int RootOrgId { get; set; }
        /// <summary>
        /// 根组织机构名称
        /// </summary>
        public string RootOrgName { get; set; }
        /// <summary>
        /// 组织机构ID
        /// </summary>
        public int OrgId { get; set; }
        /// <summary>
        /// 组织机构名称
        /// </summary>
        public string OrgName { get; set; }
        /// <summary>
        /// 申领合同的组织机构级别路径
        /// </summary>
        public string OrgLevelPath { get; set; }
        /// <summary>
        /// 订单编号
        /// </summary>
        public string OrderNO { get; set; }
        /// <summary>
        /// 游客代表姓名
        /// </summary>
        public String TouristRepName { get; set; }
        /// <summary>
        /// 游客代表电话
        /// </summary>
        public String TouristRepTel { get; set; }

        /// <summary>
        /// 已有合同编号 如果不为空则重新走合同签署流程
        /// </summary>
        public string ContractNumber { get; set; }
        /// <summary>
        /// 创建用户ID
        /// </summary>
        public Guid? CreateUserID { get; set; }
        /// <summary>
        /// 创建用户名称
        /// </summary>
        public string CreateUserName { get; set; }
        /// <summary>
        /// 产品编号
        /// </summary>
        public string ProductCode { get; set; }
        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; }
        /// <summary>
        /// 模板ID
        /// </summary>
        public TemplateTypeEnum TemplateId { get; set; }
        /// <summary>
        /// 模板名称
        /// </summary>
        public string TemplateName { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int Status { get; set; }
        public EContractDto EContractDto { get; set; }
    }
    /// <summary>
    /// 合同附件信息
    /// </summary>
    public class Attachment
    {
        /// <summary>
        /// 附件下载链接
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 附件类型,允许值："doc", "pdf"
        /// </summary>
        public string type { get; set; }
    }

    /// <summary>
    /// 请求接口基础参数
    /// </summary>
    public class BaseRequest
    {
        /// <summary>
        /// ERP授权key
        /// </summary>
        public string SourceAppId { get; set; }
        /// <summary>
        /// 授权访问key
        /// </summary>
        public string KeyAppId { get; set; }
        /// <summary>
        /// 版本号信息
        /// </summary>
        public string Version { get; set; }
        /// <summary>
        /// 授权访问Key
        /// </summary>
        public string SignKey { get; set; }
        
    }
}
